/*
 * @Author: error: git config user.name && git config user.email & please set dead value or install git
 * @Date: 2022-08-23 22:51:39
 * @LastEditors: error: git config user.name && git config user.email & please set dead value or install git
 * @LastEditTime: 2022-08-23 22:57:01
 * @FilePath: \crm_customer\src\service\operationLogService.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import axios from "../utils/axios";
import api from '../api'

//登录日志获取工单列表请求
export function getAllDataList(current_page,page_size){
    return new Promise((reslove,reject)=>{
       axios({
         url:api.operationLogApi.LOGINLOGALL_DATA,
         method:'get',
         params:{
            current_page,
            page_size
         }
       }).then((res)=>{
           console.log(res,'操作日志获取工单列表请求');
           reslove(res.data)
       }).catch((err)=>{
             console.log(err);
       })
    }) 
 } 
 
  //快速搜索按钮发起请求
  export function searvhBtn(current_page,page_size,start_time,end_time,user_name,modify_behavior){
    return new Promise((reslove,reject)=>{
       axios({
         url:api.operationLogApi.SEARCHBTN_QING,
         method:'get',
         params:{
            current_page,page_size,start_time,end_time,user_name,modify_behavior
         }
       }).then((res)=>{
           console.log(res,'操作日志快速搜索按钮请求');
           reslove(res.data)
       }).catch((err)=>{
             console.log(err);
       })
    }) 
 }
 //删除所有
  export function deleteAllData(data){
    return new Promise((reslove,reject)=>{
       axios({
          url:api.operationLogApi.DELETEALLDATA_QING,
          method:'post',
          data
       }).then((res)=>{
          reslove(res.data)
          console.log(res.data,'删除所有');
       })
    })
  }
 //删除按钮
 export function deleteBtn(action_id){
    return new Promise((reslove,reject)=>{
       axios({
          url:api.operationLogApi.DELETEBTN_QING,
          method:'post',
          params:{action_id}
       }).then((res)=>{
          reslove(res.data)
          console.log(res.data,'删除按钮');
       })
    })
 }